package xyz.zhouzhousag.service.impl;
/**
 * Description:
 * <p>
 * ClassName: AccountServiceImpl
 * date: 2021/2/25 15:58
 *
 * @author Yin.Liu
 * @version 1.0
 * @since JDK 1.8
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xyz.zhouzhousag.dao.IAccountDAO;
import xyz.zhouzhousag.domain.Account;
import xyz.zhouzhousag.service.IAccountService;

import java.util.List;

/**
 *@ClassName AccountServiceImpl
 *@Description TODO
 *@Author Yin.Liu8
 *@Date 2021/2/25 15:58
 *@Version 1.0
 */
@Service("accountService")
public class AccountServiceImpl implements IAccountService {

    @Autowired
    private IAccountDAO accountDAO;

    @Override
    public List<Account> findAll() {
        System.out.println("业务层：查询所有的账户信息...");

        return accountDAO.findAll();
    }

    @Override
    public void saveAccount(Account account) {
        accountDAO.saveAccount(account);
        System.out.println("业务层：保存账户...");
    }
}
